#include "concrete.h"

class Ncl;
class Video : public Ncl
{
	int x,y,h,w,z;
public:
	// In others ncl object creation the media is started or not
  	Video(string id, boost::shared_ptr<NclCache>& cache):Ncl(id, cache)
	{
		Ncl::type=VIDEO;
		dbg.log(__PRETTY_FUNCTION__, "Media Type:" + to_string(type) );
		setBounds();
	}

	void setBounds()
	{
		x=boost::lexical_cast<int>(Ncl::ncl_cache->getRegionAttrib("x", Ncl::str_id));	
		y=boost::lexical_cast<int>(Ncl::ncl_cache->getRegionAttrib("y", Ncl::str_id));	
		h=boost::lexical_cast<int>(Ncl::ncl_cache->getRegionAttrib("h", Ncl::str_id));	
		w=boost::lexical_cast<int>(Ncl::ncl_cache->getRegionAttrib("w", Ncl::str_id));	
		z=boost::lexical_cast<int>(Ncl::ncl_cache->getRegionAttrib("z", Ncl::str_id));	
		
		dbg.log(__PRETTY_FUNCTION__, "Bounds:" + to_string(x) + "," + to_string(y) + "," + to_string(h) + "," + to_string(w) + "," + to_string(z) );
	}

	void start()
	{
		Ncl::start();
		int ts=0;
		int te=1000000000;
		string video=Ncl::ncl_cache->getMediaSrc(str_id);
		dbg.log(__PRETTY_FUNCTION__, "Video Starting:" + video );
		concreteVideo v(video,x,y,w,h,z,ts,te);
	}

};
